<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>象牙山洗脚城</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    Vue.createApp({
        data() {
            return {
                content: '',
                setMeal: '真空套餐  帝王套餐  夏日套餐 学生套餐',
                isShow: false
            }
        },
        methods: {
            welcomebtnClick() {
                this.content = "欢迎你的光临，贵宾一位！"
            },
            byeBtnClick() {
                this.content = "欢迎下次光临，真空套餐下次8折优惠"
            },
            showOrhiddenClick() {
                this.isShow = !this.isShow
            }
        },
        template: `
        <div>
            {{content}}
            <button v-on:click="welcomebtnClick">有顾客来</button>&nbsp;
            <button v-on:click="byeBtnClick">顾客离开</button>
            <div>
                <div v-if="isShow">
                    {{setMeal}}
                </div>
                <button v-on:click="showOrhiddenClick">显示/隐藏</button>
            </div>
        </div>
        `
    }).mount("#app")
</script>

</html>